home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Update-term4.3 1.0 (21.03.95)
-
- ;(complete 0)
-
- (message (cat "This script will update `term' v4.3 to v4.3a.\nBefore the program "
- "is updated, a backup copy of your old v4.3 release will be made "
- "just in case something goes wrong.\nThis requires that you have "
- "at least 600K bytes free storage space available on your hard "
- "disk drive.\nThe script can tell the plain 68k version and the 030 "
- "version apart, so you do not need to worry about picking the wrong "
- "version."
- ))
-
- (set original (askfile (prompt "Please locate the `term' v4.3 program")
- (default "TERM:")
- (help (cat "Before the installation can proceed "
- "you need to indicate where `term' 4.3 "
- "was installed."
- ))
- ))
-
- (if (<> (exists original (noreq)) 1)
- (
- (abort (cat "Could not locate file " original))
- ))
-
- (set size (getsize original))
- (set vers (getversion original))
- (set version (/ vers 65536))
- (set revision (- vers (* version 65536)))
- (set spaceleft (getdiskspace original))
-
- (if (< spaceleft 600000)
- (
- (abort (cat ("Not enough storage space left, %ld bytes are available, we need at least 600,000 bytes." spaceleft)))
- ))
-
- (if (= 0 version)
- (
- (abort (cat ("Sorry, %s cannot be patched." original)))
- ))
-
- (if (and (<> size 577252) (<> size 584556))
- (
- (abort (cat ("Hm... %s does not look like `term' v4.3." original)))
- ))
-
- (if (or (<> version 4) (and (= version 4) (<> revision 3)))
- (
- (abort (cat ("Who do you think you're fooling, this is v%ld.%ld, not v4.3." version revision)))
- ))
-
- (rename original "term-4.3-old")
-
- (if (= size 577252)
- (set patchfile "term43a030.pch")
- (set patchfile "term43a68k.pch")
- )
-
- (set @default-dest (pathonly original))
-
- (working "Updating `term' to v4.3a")
-
- (run ("spatch -o%s -p%s %s" (tackon @default-dest "term") patchfile (tackon @default-dest "term-4.3-old")))
-
- (complete 100)
-
- (exit ("Your old %s file was renamed to %s." original (tackon @default-dest "term-4.3-old")))
-